import Login from '../../views/login/index.vue'
import Home from '../../views/home/index.vue'
import CodeGenerate from '../../views/code-generate/index.vue'
import BasicLayout from '../../Layout/index.vue'

export default [
  {
    path: '/',
    redirect: '/chat'
  },
  {
    path: '/login',
    meta: { title: '登录' },
    component: Login
  },
  {
    path: '/chat',
    component: BasicLayout,
    meta: { title: '首页' },
    children: [
      {
        path: '/chat',
        component: Home,
        meta: { title: '首页' }
      }
    ]
  },
  {
    path: '/agent',
    component: BasicLayout,
    meta: { title: 'AI 智能体' },
    children: [
      {
        path: '/agent',
        component: () => import('../../views/agent/index.vue'),
        meta: { title: 'AI 智能体' }
      },
      {
        path: '/agent/translation',
        component: () => import('../../views/agent/translation.vue'),
        meta: { title: '翻译智能体' }
      },
      {
        path: '/agent/conversion',
        component: () => import('../../views/agent/conversion.vue'),
        meta: { title: '格式转换智能体' }
      },
      {
        path: '/agent/comment-generator',
        component: () => import('../../views/agent/comment-generator.vue'),
        meta: { title: '注释生成器' }
      },
      {
        path: '/agent/code-generator',
        component: () => import('../../views/agent/code-generator.vue'),
        meta: { title: '代码生成器' }
      },
      {
        path: '/code-template',
        component: () => import('../../views/code-template/index.vue'),
        meta: { title: '自定义模板' }
      },
      {
        path: '/code-template/detail/:id',
        component: () => import('../../views/code-template/detail.vue'),
        meta: { title: '自定义模板详情' }
      },
      {
        path: '/agent/name-generator',
        component: () => import('../../views/agent/name-generator.vue'),
        meta: { title: '程序命名大师' }
      },
      {
        path: '/agent/db-design-assistant',
        component: () => import('../../views/agent/db-design-assistant.vue'),
        meta: { title: '数据库表设计助手' }
      },
      {
        path: '/agent/paper-optimizer',
        component: () => import('../../views/agent/paper-optimizer.vue'),
        meta: { title: '论文优化大师' }
      },
      {
        path: '/agent/interview-simulator',
        component: () => import('../../views/agent/interview-simulator.vue'),
        meta: { title: '面试模拟大师' }
      }
    ]
  },
  {
    path: '/error',
    meta: { title: '错误页面' },
    component: BasicLayout,
    children: [
      {
        path: '/error/401',
        component: () => import('../../views/error/401.vue'),
        meta: { title: '401' }
      },
      {
        path: '/error/403',
        component: () => import('../../views/error/403.vue'),
        meta: { title: '403' }
      },
      {
        path: '/error/404',
        component: () => import('../../views/error/404.vue'),
        meta: { title: '404' }
      },
      {
        path: '/error/500',
        component: () => import('../../views/error/500.vue'),
        meta: { title: '500' }
      }
    ]
  }
]
